max_num = 101
st = []
p = [1] * max_num
for i in range(2, max_num):
    if p[i] == 1:
        st.append(i)
        p[i] = i
    for num in st:
        if num * i < max_num:
            p[i * num] = num
        else:
            break
        if i % num == 0:
            break
print(st)
print(p)